<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://www.w3.org/1999/XSL/Transform">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
    <div th:replace="common/IncludeTop">
    </div>

    <div id="Content">

        <div id="BackLink">
            <a href="/catalog/viewAdminmain">Return to Main Menu</a>
        </div>

        <table>
            <table align="center">
                <tr>
                    <th>Order ID</th>
                    <th>Date</th>
                    <th>Total Price</th>
                    <th>Operate</th>
                </tr>
                <tr th:each="order:${orderList}" >
                    <td>
                        <a th:href="@{'/adminOrder/adminViewOrder?orderId='+${order.orderId}}" th:text="${order.orderId}"></a>
                    </td>
                    <td th:text="${#dates.format(order.orderDate, 'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td th:text="'$' + ${order.totalPrice}"></td>
                    <td>
                        <a th:href="@{'/adminOrder/handleOrder?orderId='+${order.orderId}}" th:class="Button" th:id="handleOrderButton">
                            Handled
                        </a>
                    </td>
                </tr>
            </table>
        </table>
    </div>

    <div th:replace="common/IncludeBottom">
    </div>
</body>
</html>